<table border="1" cellpadding="3" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse; table-layout:fixed;word-wrap:break-word;" width="100%" class="table_common">
    <tr>
        <th rowspan="2" style="background-color: #B10505;color: #fff">地区</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">大区</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">小区</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">省份</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">城市</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">专营店</th>
        <th rowspan="2" style="background-color: #B10505;color: #fff">专营店编码</th>
        <?php foreach ((array)$proList as $proK => $proV): ?>
        <th colspan="<?=4+$proV['actCount']*2+$proV['itemCount']?>" style="background-color: #B10505;color: #fff">项目名称（<?=$proV['proName']?>）</th>
        <?php endforeach ?>
   </tr>
   <tr>
        <?php foreach ((array)$proList as $proK => $proV): ?>
        <th style="background-color: #B10505;color: #fff">所属双月</th>
        <th style="background-color: #B10505;color: #fff">项目类型</th>
        <?php foreach ((array)$proV['actList'] as $actK => $actV): ?>
        <th style="background-color: #B10505;color: #fff"><?=msubstr($actV['actTitle'],0,3)?></th>
          <?php foreach ((array)$actV['itemList'] as $itemK => $itemV): ?>
            <th style="background-color: #B10505;color: #fff"><?=msubstr($itemV['itemTitle'],2,100)?></th>
          <?php endforeach ?>  
        <th style="background-color: #B10505;color: #fff">审核意见</th>
        <?php endforeach ?>
        <th style="background-color: #B10505;color: #fff">截至提交时间</th>
        <th style="background-color: #B10505;color: #fff">审核结果</th>
        <?php endforeach ?>
   </tr>
   <?php foreach ((array)$storeProList as $storeId => $storeProData): ?>
    <?php
    $storeData = isset($allStoreList[$storeId]) ? $allStoreList[$storeId] : array();
    ?>
   <tr align="center">
       <td><?=$storeData['area'];?></td>
       <td><?=$storeData['region'];?></td>
       <td><?=$storeData['spsarea'];?></td>
       <td><?=$storeData['province'];?></td>
       <td><?=$storeData['city'];?></td>
       <td><?=$storeData['storeName'];?></td>
       <td><?=$storeData['coding'];?></td>

       <?php foreach ((array)$proList as $proK => $proV): ?>
        <td><?=$proV['timeUnitStr']?></td>
        <td><?=$proV['proTypeName']?></td>
          <?php foreach ((array)$proV['actList'] as $actK => $actV): ?>
            <td><?=msubstr($actV['actTitle'],4,100)?></td>
            <?php foreach ((array)$actV['itemList'] as $itemK => $itemV): ?>
              <?php
              //专营店回复值
              $storeItemData = isset($storeProData[$proK]['itemValue'][$itemK]) ? $storeProData[$proK]['itemValue'][$itemK] : array(); ?>
              <td>
                <?php
                if (in_array($itemV['type'], array(1,2,5,))) {//纯文本提、数值题、时间反馈题
                  echo $storeItemData['value'];
                }elseif (in_array($itemV['type'], array(3,4))) {//单选题、多选题
                  $optionValue = array();
                  if ($storeItemData['value']) {
                    foreach ((array)$storeItemData['value'] as $optionV) {
                      isset($itemV['otherData']['options'][(int)$optionV]) && $optionValue[] = $itemV['otherData']['options'][(int)$optionV];
                    }
                  }
                  echo implode(',', $optionValue);
                }elseif (in_array($itemV['type'], array(6,7))) {//图片题、附件题
                  $imgUrl = isset($storeItemData['viewPath']) && $storeItemData['viewPath'] ? "http://www.dflpvmkt.com.cn".$storeItemData['viewPath'] : '';
                   echo $imgUrl ? '<a target="_blank" href="'.$imgUrl.'">'.$imgUrl.'</a>' : '';
                }
                ?>
              </td>
            <?php endforeach ?>
            <td><?php
            echo isset($storeProData[$proK]['auditValue'][$actK]) ? $storeProData[$proK]['auditValue'][$actK]['auditDes'] : '';
            ?></td>
          <?php endforeach ?>
        <td><?=date("Y-m-d H:i:s", $proV['endTime'])?></td>
        <td><?=isset($storeProData[$proK]['auditRsStr']) ? $storeProData[$proK]['auditRsStr'] :''?></td>
        <?php endforeach ?>
   </tr>
   <?php endforeach ?>
</table>